package com.xt.purchasingsystem.controller;


import com.xt.purchasingsystem.service.SupplierRecommendDetailService;
import com.xt.purchasingsystem.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 产品供应商推荐单明细所有接口
 * </p>
 *
 * @author yhp
 * @since 2020-05-31
 */
@RestController
@RequestMapping("/supplierRecommendDetail")
public class SupplierRecommendDetailController {
    @Autowired
    protected SupplierRecommendDetailService supplierRecommendDetailService;

    /**
     * 根据产品编号查询此产品所有已推荐的供应商
     * @param productId
     * @return
     */
    @GetMapping("/{productId}")
    public Result getAllSupplierRecommendDetailByProductId(@PathVariable String productId) {
      return  supplierRecommendDetailService.getAllSupplierRecommendDetailByProductId(productId);
    }

}

